<?php 
$templateURL = $this->basePath('public/template');
?>
<div id="video_main">
<div class="gers">
<?php if($this->Product_detail->ID_PRT == 1): ?>
   <div  class="video_1"><?php echo $this->Product_detail->CONTENT_PR ?></div>
<?php elseif ($this->Product_detail->ID_PRT == 2): ?>

<video id="video_1" class="video-js vjs-default-skin vjs-big-play-centered" controls preload="none" width="673" height="372"
      data-setup='{"controls": true, "autoplay": false, "preload": "auto","techOrder": ["youtube"], "src": "<?php echo $this->Product_detail->CONTENT_PR ?>"}'>
  </video>
  <?php endif; ?>
  
       <div class="title_detail">
       <?php echo $this->Product_detail->NAME_PR;?>
        <div class="absbub">
                     <ul>
                        <li>
                            <i class="fa fa-user"></i>
                             <span class="userthepost"><?php echo $this->Product_detail->AUTHOR?></span>
                        </li>
                        <li>
                            <i class="fa fa-calendar"></i>
                            <span class="datevideo"><?php echo $this->Product_detail->DATE_PR?></span>
                        </li>
                        <li>
                          <i class="fa fa-eye"></i>
                          <span class="viewvideo"><?php echo $this->Product_detail->VIEW?></span>
                        </li>
                        <li>
                           <i class="fa fa-comments"></i>
                           <span class="comment">12</span>
                        </li>
                     </ul>  
                   </div>
           <div class="fb-like" data-href="<?php echo $this->serverUrl(true)?>" data-layout="standard" data-action="like" data-show-faces="false" data-share="true"></div>
         <div class="fbcomments">
          <div class="fb-comments" data-width="100%" data-href="<?php echo $this->serverUrl(true)?>" data-numposts="5" data-colorscheme="light"></div>
        </div>
       </div>
  </div>
  <div class="mostviews-detail">
                <?php foreach ($this->productcl as $productfrontend) : ?>
                <div class="submostview">
                <a href="<?php
						    $str = $productfrontend['NAME_PR'];
					      	$str = preg_replace("/(à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ)/", 'a', $str);
							$str = preg_replace("/(è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ)/", 'e', $str);
							$str = preg_replace("/(ì|í|ị|ỉ|ĩ)/", 'i', $str);
							$str = preg_replace("/(ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ)/", 'o', $str);
							$str = preg_replace("/(ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ)/", 'u', $str);
							$str = preg_replace("/(ỳ|ý|ỵ|ỷ|ỹ)/", 'y', $str);
							$str = preg_replace("/(đ)/", 'd', $str);
							$str = preg_replace("/(À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ)/", 'A', $str);
							$str = preg_replace("/(È|É|Ẹ|Ẻ|Ẽ|Ê|Ề|Ế|Ệ|Ể|Ễ)/", 'E', $str);
							$str = preg_replace("/(Ì|Í|Ị|Ỉ|Ĩ)/", 'I', $str);
							$str = preg_replace("/(Ò|Ó|Ọ|Ỏ|Õ|Ô|Ồ|Ố|Ộ|Ổ|Ỗ|Ơ|Ờ|Ớ|Ợ|Ở|Ỡ)/", 'O', $str);
							$str = preg_replace("/(Ù|Ú|Ụ|Ủ|Ũ|Ư|Ừ|Ứ|Ự|Ử|Ữ)/", 'U', $str);
							$str = preg_replace("/(Ỳ|Ý|Ỵ|Ỷ|Ỹ)/", 'Y', $str);
							$str = preg_replace("/(Đ)/", 'D', $str);
							
					        $str = strtolower(preg_replace(array('/[^a-zA-Z0-9 -]/', '/[ -]+/', '/^-|-$/'),
                             array('', '-', ''), $str));
								      
					      echo  $this->url('frontend/default',array('action'=>'video', 'id' => $productfrontend['ID_PR'])).'-'.$str.'.html';
					      ?>">
                     <div class="imgview">
                          <img class="img-thumbnail" src="<?php echo '/timthumb/126x83/'.$this->escapeHtml($productfrontend['LINKIMG']);?>" alt="<?php echo $productfrontend['NAME_PR']?>" width="126" height="83" />
                     </div>
                     <div class="contentview">
                        <div class="titleview"><?php echo $productfrontend['NAME_PR']?></div>
                        <div class="dateview"><?php echo $productfrontend['DATE_PR']?></div>
                     </div>
                     <?php if($productfrontend['ID_PRT'] == 2): ?>
                      <span class="icon_video_2"><i class="fa fa-youtube-play"></i>
                     </span>
                     <?php endif; ?>
                     </a>
                </div>
                <?php endforeach;?>
            </div>
            <div class="mostviewsvideo">
			<iframe src="//www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fvisiay&amp;width&amp;height=290&amp;colorscheme=light&amp;show_faces=true&amp;header=true&amp;stream=false&amp;show_border=true" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width: 278px; height:290px;" allowTransparency="true"></iframe>             
			</div>
  </div>
  <script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/vi_VN/sdk.js#xfbml=1&version=v2.0";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>